﻿using System;
using System.Collections.Generic;
using System.Text;

namespace TuKu
{
    /// <summary>
    /// 任务分块信息
    /// </summary>
    public class DTaskConfigData
    {
        /// <summary>
        /// 新建任务分块信息
        /// </summary>
        public DTaskConfigData()
        {
        }

        #region 属性

        private long m_BeginIndex;
        private long m_EndIndex;
        private long m_CurIndex;

        /// <summary>
        /// 起始偏移量
        /// </summary>
        public long BeginIndex
        {
            get { return m_BeginIndex; }
            set { m_BeginIndex = value; }
        }
        /// <summary>
        /// 结束偏移量
        /// </summary>
        public long EndIndex
        {
            get { return m_EndIndex; }
            set { m_EndIndex = value; }
        }
        /// <summary>
        /// 当前偏移量（从此处下载）
        /// </summary>
        public long CurIndex
        {
            get { return m_CurIndex; }
            set { m_CurIndex = value; }
        }
        /// <summary>
        /// 已下载大小
        /// </summary>
        public long DownloadSize
        {
            get { return CurIndex - BeginIndex; }
        }

        #endregion
    }
}
